<?php
require_once('config.php');

$id=$_GET['id'];

$sql="delete from userinfo where id='$id'";

mysqli_query($conn,$sql);

$cont=mysqli_affected_rows($conn);




$obj=array();

if($cont>0){//删除成功
    $obj['code']=1;
    $obj['msg']='删除成功';
    $obj['data']=true;
}else{
    $obj['code']=0;
    $obj['msg']='删除失败';
    $obj['data']=false;
}

echo json_encode($obj);